<?php
 //var_dump(intval(new stdClass));//报错
 $obj=new class{
    public $p=2112;
 };
 var_dump(intval($obj));//报错